///*
// *
// * Copyright 2017-2018 549477611@qq.com(xiaoyu)
// *
// * This copyrighted material is made available to anyone wishing to use, modify,
// * copy, or redistribute it subject to the terms and conditions of the GNU
// * Lesser General Public License, as published by the Free Software Foundation.
// *
// * This program is distributed in the hope that it will be useful,
// * but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
// * or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Lesser General Public License
// * for more details.
// *
// * You should have received a copy of the GNU Lesser General Public License
// * along with this distribution; if not, see <http://www.gnu.org/licenses/>.
// *
// */
//
//package org.dromara.myth.demo.springcloud.order.configuration;
//
//import org.springframework.context.annotation.Bean;
//import org.springframework.context.annotation.Configuration;
//import org.springframework.http.ResponseEntity;
//import org.springframework.web.bind.annotation.RequestMethod;
//import org.springframework.web.bind.annotation.RestController;
//import springfox.documentation.builders.ApiInfoBuilder;
//import springfox.documentation.builders.RequestHandlerSelectors;
//import springfox.documentation.builders.ResponseMessageBuilder;
//import springfox.documentation.schema.ModelRef;
//import springfox.documentation.service.ApiInfo;
//import springfox.documentation.service.Contact;
//import springfox.documentation.spi.DocumentationType;
//import springfox.documentation.spring.web.plugins.Docket;
//import springfox.documentation.swagger2.annotations.EnableSwagger2;
//
//import java.time.LocalDate;
//
//import static com.google.common.collect.Lists.newArrayList;
//
///**
// * The type Swagger config.
// *
// * @author xiaoyu
// */
//@Configuration
//@EnableSwagger2
//public class SwaggerConfig {
//
//    private static final String VERSION = "1.0.0";
//
//    /**
//     * Api info api info.
//     *
//     * @return the api info
//     */
//    ApiInfo apiInfo() {
//        return new ApiInfoBuilder()
//                .title("Swagger API")
//                .description("Myth分布式事务解决方案之SpringCloud测试体验")
//                .license("Apache 2.0")
//                .licenseUrl("http://www.apache.org/licenses/LICENSE-2.0.html")
//                .termsOfServiceUrl("")
//                .version(VERSION)
//                .contact(new Contact("xiaoyu", "", "549477611@qq.com"))
//                .build();
//    }
//
//    /**
//     * Api docket.
//     *
//     * @return the docket
//     */
//    @Bean
//    public Docket api() {
//        return new Docket(DocumentationType.SWAGGER_2).apiInfo(apiInfo()).select().apis(RequestHandlerSelectors.withClassAnnotation(RestController.class))
//                // .paths(paths())
//                .build().pathMapping("/").directModelSubstitute(LocalDate.class, String.class)
//                .genericModelSubstitutes(ResponseEntity.class).useDefaultResponseMessages(false)
//                .globalResponseMessage(RequestMethod.GET, newArrayList(new ResponseMessageBuilder().code(500).message("500 message")
//                        .responseModel(new ModelRef("Error")).build()));
//    }
//
//}
